﻿<%@ Page Title="测试正则表达式" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="RegexLib.Web.Views.Regex.Test" %>
<asp:Content ContentPlaceHolderID="headContentPlaceHolder" runat="server">
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/container/assets/skins/sam/container.css" />
	<link rel="Stylesheet" type="text/css" href="/Content/styles/RxTest.css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<% var regex = (RegexInfo)ViewData["Regex"]; %>
<div class="box">
<div class="bt">测试正则表达式</div>
<div class="bc">
<% if (regex != null) %>
<% { %>
	<p><strong>您正在测试<a href='<%= RxUrl.GetViewRegexUrl(regex.AccessKey) %>'><%= HttpUtility.HtmlEncode(regex.Title) %></a></strong>，<a href="/Regex/Test/">点击这里</a>解除绑定关系。</p>
<% } %>
<p>注意：本测试工具使用的是.NET Framework的正则表达式引擎，与其他语言或平台的测试结果可能略有区别。</p>
<form id="TheForm" action="/Regex/TestSubmit/" method="post">
<table style="width:100%">
<tr><td style="line-height:10pt">
<fieldset>
<legend>正则表达式模式</legend>
<p class="ds">请在这里输入要进行测试的正则表达式模式串。</p>
<textarea name="patternString" class="reta" <%= regex != null ? "readonly='readonly'" : "" %>><% if (regex != null) { %><%= regex.Pattern %><% } %></textarea>
</fieldset>
<fieldset>
<legend>待测字符串</legend>
<p class="ds">请在这里输入要尝试进行匹配的字符串。</p>
<textarea name="testString" class="reta"></textarea>
</fieldset>
</td><td style="vertical-align:top;padding-left:10px;line-height:10pt">
<fieldset>
<legend>测试选项</legend>
<input type="checkbox" name="testOption" value="None" visible="false" style="visibility:hidden;display:none" checked="checked" />
<input type="checkbox" name="testOption" value="IgnoreCase" id="oic" /><label for="oic">IgnoreCase</label><br />
<input type="checkbox" name="testOption" value="Multiline" id="oml" /><label for="oml">Multiline</label><br />
<input type="checkbox" name="testOption" value="ExplicitCapture" id="oec" /><label for="oec">ExplicitCapture</label><br />
<input type="checkbox" name="testOption" value="Singleline" id="osl" /><label for="osl">Singleline</label><br />
<input type="checkbox" name="testOption" value="IgnorePatternWhitespace" id="oiw" /><label for="oiw">IgnorePatternWhitespace</label><br />
<input type="checkbox" name="testOption" value="RightToLeft" id="orl" /><label for="orl">RightToLeft</label><br />
<input type="checkbox" name="testOption" value="ECMAScript" id="oes" /><label for="oes">ECMAScript</label><br />
<input type="checkbox" name="testOption" value="CultureInvariant" id="oci" /><label for="oci">CultureInvariant</label>
</fieldset>
<div class="ad-c"><%= RxAdsUtility.GetAdsCode("test-page") %></div>
</td></tr>
</table>
</form>
<button id="SubmitBtn">开始测试</button>
</div>
</div>
<div class="box">
<div class="bt">测试结果</div>
<div id="ResultDiv" class="bc">
</div>
<div id="ResultSeg">
	<div class="hd"></div>
	<div class="bd"></div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/dragdrop/dragdrop-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/container/container-min.js"></script>
<script type="text/javascript" src="/Content/script/rxtest.js"></script>
</asp:Content>
